import request from '@/utils/request'

const module = '/admin/product/spec'
//查询所有品牌
export const GetAllSpecs = () => {
  return request({
    url: `${module}/list`,
    method: 'GET',
  })
}
// 查询品牌分页列表
export const GetSpecs = (pageNum, pageSize) => {
  return request({
    url: `${module}/list/${pageNum}/${pageSize}`,
    method: 'GET',
  })
}
//删除指定品牌
export const DeleteSpecsById = id => {
  return request({
    url: `${module}/deleteById/${id}`,
    method: 'DELETE',
  })
}
//新增品牌
export const SaveSpecs = spec => {
  return request({
    url: `${module}/save`,
    method: 'POST',
    data: spec,
  })
}
//查询指定品牌
export const GetSpecsById = id => {
  return request({
    url: `${module}/getById/${id}`,
    method: 'GET',
  })
}
//更新品牌
export const UpdateSpecs = spec => {
  return request({
    url: `${module}/update`,
    method: 'PUT',
    data: spec,
  })
}
